package com.jtbd.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@Schema(description = "机构创建请求参数")
public class OrgCreateHttpDto {
    @Schema(description = "机构名称")
    @NotBlank(message = "机构名称不能为空")
    private String name;
    @Schema(description = "机构联系人")
    @NotBlank(message = "机构联系人不能为空")
    private String contactPerson;
    @Schema(description = "机构联系电话")
    @NotBlank(message = "机构联系电话不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "请输入正确的手机号码")
    private String contactPhone;
    @Schema(description = "机构描述")
    private String description;
    @Schema(description = "机构加入时间")
    @NotNull(message = "机构加入时间不能为空")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date joinTime;
    @Schema(description = "机构到期时间")
    @NotNull(message = "机构到期时间不能为空")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date exprieTime;
    @Schema(description = "机构父级id")
    private Long parentId;
}
